/**
 * 接口定义类
 */
interface PersonInterface {
  name: string,
  age: string,
  speak(n: number): void
}


class Doctor implements PersonInterface {
  constructor(
    public name: string,
    public age: string,
  ) { }
  speak(n: number): void {
    for (let i = 0; i < n; i++) {
      console.log(`我叫${this.name}，今年${this.age}岁`)
    }
  }
}
